test(e2e): wait for real oracle rotation in fee_settings inflate helper#23334
Merged
spalladino merged 1 commit intoMay 16, 2026
Merged
Conversation
spalladino
approved these changes
May 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
PR #23253 was dequeued from the merge queue when
merge-queue-heavy's grind exercise hit a flake ine2e_fees/fee_settings.test.ts(introduced by #23303, the head ofmerge-train/spartan). Failing sub-test:reproduces the stale fee snapshot race deterministically. CI log: http://ci.aztec-labs.com/cd390ea14cac1093bumpedMinFees(1067501300000) was effectively the natural L2 baseline at that moment — no oracle rotation had occurred. The retry insideinflateL2FeesViaL1BaseFeeexited as soon asafter > before(withbeforecaptured at function entry), but the natural L2 fee fluctuates between L1 blocks (EIP-1559 decay swings the L1 base-fee sample), so a sub-percent upward drift satisfied the exit without the oracle deadband (LIFETIME - LAG = 3L2 slots = 36 s) ever opening. The test ran for only ~15 s before exiting, well short of the deadband.The caller's
bumpedMinFees > lowerMinFees * 1.1assertion then failed becauselowerMinFeeswas a separate snapshot taken earlier, and natural drift between the two snapshots was below 10 %.There is also a latent upper-bound issue: even on a successful rotation the original
3xL1 base-fee bump drives the L2 fee to ~2.0–2.5x once EIP-1559 decay on the rotation-tx's block is applied, which would have also failedhigherMinFees > bumpedMinFees(wherehigherMinFees = lowerMinFees * 2n).What
Three changes in
yarn-project/end-to-end/src/e2e_fees/fee_settings.test.ts:inflateL2FeesViaL1BaseFeetakes areference: GasFeesparameter and only returns whenafter.feePerL2Gas >= reference * 13/10. This distinguishes a real oracle rotation (≥1.5x rise) from ambient noise (≤±10%) and forces the loop to wait through the 36 s deadband.higherMinFeesgrows fromlowerMinFees.mul(2)tolowerMinFees.mul(4), giving unambiguous headroom over the realized bumped fee while staying under the 6x default-padding cap sotxWithDefaultPaddingis still the comparison point.Test #1's bounds and semantics are unchanged; only the call site is updated to pass
stableMinFeesas the reference.Test plan
merge-queue-heavy(10 parallel grind runs of e2e_fees/fee_settings)ci-full-no-test-cachealready passed at the head commit; the flake only surfaces under grindAnalysis: https://gist.github.com/AztecBot/97861b48883eec686f5978a43a2082bb
ClaudeBox log: https://claudebox.work/s/89d3754c8b2b7140?run=1